﻿using Max.PH5_2006.ShoppingSite.DTO;
using Max.PH5_2006.ShoppingSite.IService;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;

namespace Max.PH5_2006.ShoppingSite.API.Controllers
{
    [Route("dictionary")]
    [ApiController]
    public class DictionaryController : ControllerBase
    {
        IDictionaryService _service;

        public DictionaryController(IDictionaryService service)
        {
            _service = service;
        }

        [HttpGet]
        public IActionResult Query()
        {
            ResponseResultDto result = new();

            var list = _service.Query();

            result.Data = list;

            return Ok(result);
        }
    }
}
